<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="gamble.money.vo.PageVO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Gamble | 충전리스트</title>
</head>
<body>
	<div id="content">
		<h1>상세 내역</h1>
		<table width="700">
			<tr>
				<td>날짜</td><td>입금</td><td>출금</td><td>총금액</td>
			</tr>
			<c:forEach var="list" items="${list}">
				<c:choose>
					<c:when test="${list.classify==0}">
						<tr>
							<td>${list.cdate }</td>
							<td></td>
							<td>${list.money }</td>
							<td>${list.totalmoney }</td>
						</tr>
					</c:when>
					<c:otherwise>
						<tr>
							<td>${list.cdate }</td>
							<td>${list.money }</td>
							<td></td>
							<td>${list.totalmoney }</td>
						</tr>
					</c:otherwise>
				</c:choose>
				
			</c:forEach>
		</table>
		
		
   <c:choose>   
    <c:when test="${pv.currentPage<=pv.blockPage}">
    	<c:out value="이전" />
    </c:when> 
    
    <c:otherwise>    	
    	<c:set var="currentPage" value="${pv.startPage-pv.blockPage}"/>    	
       <a href="chargelist.do?currentPage=${currentPage}">이전</a>
    </c:otherwise>
     </c:choose> 
     
     <c:forEach var="i"  begin="${pv.startPage}" end="${pv.endPage}">
        	<a href="chargelist.do?currentPage=${i}">${i}</a>
   </c:forEach>
    
    <c:choose>
    <c:when test="${pv.endPage==pv.totalPage}">
    	<c:out value="다음"/>
    </c:when>    
    
    <c:otherwise>
    <c:set  var="currentPage" value="${pv.startPage+pv.blockPage}"/>  
    	
    	<a href="chargelist.do?currentPage=${currentPage}">다음</a> 	
   </c:otherwise>
   
   </c:choose>
	
	</div>
</body>
</html>